<div class="asset-selector-container"
        th:with="assetAssociationId=${entityForm.id==null? entityForm.parentId : entityForm.id}">
    <div class="field-label inline" th:text="#{${field.friendlyName}}" th:classappend="${field.required ? 'required' : ''}" />
    <div th:substituteby="components/fieldTooltip" />

    <span class="error" th:errors="*{fields['__${field.name}__'].value}" />
    <a class="show-asset-freeform-url" href="#" th:text="'(' + #{Freeform_URL} + ')'" />
    <br/>
    
    <input type="hidden" class="mediaUrl twelve" th:field="*{fields['__${field.name}__'].value}" th:classappend="${field.required ? 'required' : ''}" />
    
    <img class="thumbnail" 
        th:if="*{fields['__${field.name}__'].value != null and fields['__${field.name}__'].value != ''}"
        th:src="@{*{fields['__${field.name}__'].value + '?largeAdminThumbnail'}}"
        th:attr="data-fullurl=@{*{fields['__${field.name}__'].value}}" />
        
    <img class="thumbnail placeholder-image" 
        th:src="@{/img/admin/placeholder-60x60.gif}"
        th:unless="*{fields['__${field.name}__'].value != null and fields['__${field.name}__'].value != ''}" />

    <button class="show-asset-selector tiny radius secondary button hover-cursor"
            type="button" th:inline="text"
            th:if="${overrideAssetSectionKey}"
            th:attr="data-select-url=@{${'/'+overrideAssetSectionKey+ '/' + assetAssociationId + '/chooseAsset'}}">
        <i class="icon-camera"></i>&nbsp;[[#{Select_Upload_Image}]]
    </button>

    <button class="show-asset-selector tiny radius secondary button hover-cursor"
        type="button" th:inline="text"
        th:unless="${overrideAssetSectionKey}"
        th:attr="data-select-url=@{${'/'+sectionKey+ '/' + assetAssociationId + '/chooseAsset'}}">
        <i class="icon-camera"></i>&nbsp;[[#{Select_Upload_Image}]]
    </button>

</div>


